package com.douglas.managesystem.entity;

import com.alibaba.fastjson.annotation.JSONField;
import lombok.Data;
import org.apache.shiro.util.ByteSource;
import org.springframework.data.annotation.Transient;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * @author douglas
 */
@Data
public class User implements Serializable {
    private String id;

    private String username;

    private String password;

    private String mobile;

    private String realname;

    private Integer status;

    private String pageStyle;
    
    private String salt;

    private String lastLoginIp;

    private Date lastLoginTime;

    private String portrait;

    private String createBy;

//    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    private String updateBy;

    private Date updateTime;
    
    @JSONField(serialize=false)
    @Transient
    private ByteSource saltByte;

    /**
     * 角色类型
     */
    private Integer roleType;

}